<!DOCTYPE>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
    <title>部门修改</title>
    <link href="/css/style2.css" rel="stylesheet" type="text/css"/>
    <link href="/css/select.css" rel="stylesheet" type="text/css"/>
    <script src="/js/jquery.js" type="text/javascript"></script>
    <script src="/js/jquery.idTabs.min.js" type="text/javascript"></script>
    <script src="/js/select-ui.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        KE.show({
            id: 'content7',
            cssPath: './index.css'
        });
    </script>

    <script type="text/javascript">
        $(document).ready(function (e) {
            $(".select1").uedSelect({
                width: 345
            });
            $(".select2").uedSelect({
                width: 167
            });
            $(".select3").uedSelect({
                width: 100
            });
        });
    </script>
    <script language="javascript">
        function saveButton() {
            document.forms[0].action = "deptSave";

            let form = $('#deptForm').serializeArray()

            for (let i = 0; i < form.length; i++) {
                if (form[i].value == '') {
                    alert('请填写完整！')
                    return
                }
            }


            document.forms[0].submit();
        }
    </script>


</head>

<body>
<form id="deptForm">
    <div class="place">
        <span>位置：</span>
        <ul class="placeul">
            <li><a href="deptSearch">部门管理</a></li>
            <li><a href="#">修改部门</a></li>
        </ul>
    </div>

    <div class="formbody">

        <div class="formtitle"><span>基本信息</span></div>

        <ul class="forminfo">
            <li>
                <label>部门编号</label>
                </label><input class="dfinput" name="departmentId" readonly="readonly" th:value="${dept.departmentId}"
                               type="text"/></li>
            <li>
                <label>部门名称</label>
                <input class="dfinput" name="departmentName" th:value="${dept.departmentName}" type="text"/>
            </li>
            <li>
                <label>负责人 </label>
                <div class="vocation">
                    <select class="select3" name="manager">
                        <option>--请选择--</option>
                        <option th:selected="${dept.manager=='余力'}" value="余力">
                            余力
                        </option>
                        <option th:selected="${dept.manager=='张安娜'}" value="张安娜">
                            张安娜
                        </option>
                        <option th:selected="${dept.manager=='张楠'}" value="张楠">
                            张楠
                        </option>
                        <option th:selected="${dept.manager=='张丽丽'}" value="张丽丽">
                            张丽丽
                        </option>
                    </select>
                </div>
            </li>
            <li><label>&nbsp;</label><input class="btn" name="" onclick="saveButton()" type="button" value="确认保存"/></li>
        </ul>
    </div>
</form>
</body>
</html>
